//
//  NewsTopicModel.m
//  miaopai
//
//  Created by duyifang on 15/11/13.
//  Copyright © 2015年 Crow Zhang. All rights reserved.
//

#import "NewsTopicModel.h"

@implementation NewsTopicModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{

}
- (void)setValue:(id)value forKey:(NSString *)key{
    if ([key isEqualToString:@"new"]) {
        self.NEW = value;
    }else if ([key isEqualToString:@"topic"]) {
        NSDictionary *dic = value;
        self.topic = [TopicModel topicModelWithDictionary:dic];
    }else{
        [super setValue:value forKey:key];
    }
}

+ (NewsTopicModel *)newsTopicModelWithDictionary:(NSDictionary *)dictionary
{
    NewsTopicModel *newsTopicModel = [[NewsTopicModel alloc] initWithDictionary:dictionary];
    return [newsTopicModel autorelease];
}

@end
